import request from '@/utils/request'

// 查询水表告警列表
export function listMeterWarn(query) {
    return request({
        url: '/water/MeterWarn/list',
        method: 'get',
        params: query
    })
}

// 查询水表告警详细
export function getMeterWarn(id) {
    return request({
        url: '/water/MeterWarn/' + id,
        method: 'get'
    })
}

// 新增水表告警
export function addMeterWarn(data) {
    return request({
        url: '/water/MeterWarn',
        method: 'post',
        data: data
    })
}

// 修改水表告警
export function updateMeterWarn(data) {
    return request({
        url: '/water/MeterWarn',
        method: 'put',
        data: data
    })
}

// 删除水表告警
export function delMeterWarn(id) {
    return request({
        url: '/water/MeterWarn/' + id,
        method: 'delete'
    })
}

export function generateMeterWarnings(params) {
    return request({
        url: '/water/MeterWarn/generateWarnings',
        method: 'post',
        params: params
    })
}
